<template>
	<view>
		<view class="complaints_header" :style="{ paddingTop: StatusBar + 'px' }">
			<view class="header_box">
				<view class="header_back" @click="navigateBack()">
					<text class="iconfont icon-Left"></text>
				</view>
				<view class="header_title">设置</view>
			</view>
		</view>
		<view class="loan_box">
			<view class="loan_list">
				<view class="list_item" v-for="(item, index) in productList" :key="index">
					<view class="item_bottom" @click="navigateTo(item.path)">
						<view class="bottom_item flex">
							<view class="names">{{ item.text }}</view>
						</view>

						<view class="bottom_item">
							<view class="notice_more">
								<text class="iconfont icon-Right"></text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="loan_list">
				<view class="list_item" v-for="(item, index) in productList2" :key="index">
					<view class="item_bottom">
						<view class="bottom_item flex">
							<view class="names">{{ item.text }}</view>
						</view>

						<view class="bottom_item">
							<view class="notice_more">
								<text class="iconfont icon-Right"></text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="btm_class"><u-button class="btn_class" shape="square" @tap="out_login()">退出登录</u-button></view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			productList: [
				{
					text: '个人资料管理',
					path: 'personalData'
				},
				{
					text: '登录密码管理',
					path: 'loginPassword'
				}
			],
			productList2: [
				{
					text: '隐私政策'
				},
				{
					text: '用户协议'
				}
			]
		};
	},
	methods: {
		out_login(){
			uni.removeStorageSync('token')
			uni.reLaunch({
				url: '/pages/login/login?url=' + JSON.stringify({
					path: '/' + 'pages/index/index',
					query: {}
				})
			})
		}
	}
};
</script>

<style>
page {
	background: #f7f8fa;
}
</style>
<style lang="scss" scoped>
.complaints_header {
	background: #fff;
	.header_box {
		display: flex;
		align-items: center;
		padding: 28rpx 32rpx;
		position: relative;
		font-weight: bold;
		.header_back {
			margin-left: 30rpx;
			display: flex;
			align-items: center;
			justify-content: center;
		}
		.header_title {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
		}
	}
}
.loan_box {
	width: 90%;
	margin: 20rpx auto;

	padding-bottom: 20rpx;
	box-sizing: border-box;

	.loan_list {
		background-color: #fff;
		margin-top: 30rpx;
		border-radius: 10rpx;
		padding: 10rpx 20rpx;
		.list_item {
			padding: 26rpx;
			display: flex;
			align-items: center;
			.item_bottom {
				display: flex;
				padding-bottom: 5rpx;
				width: 100%;
				justify-content: space-between;
				.bottom_item {
					.names {
						font-weight: 500;
						font-size: 28rpx;
						color: #22150b;
						line-height: 50rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}
					.iconfont {
						margin-left: 8rpx;
						font-size: 14rpx;
						font-weight: bold;
						color: #aeaeae;
					}
				}
			}
		}
	}
}
.btm_class {
	position: fixed;
	bottom: 0;
	width: 100%;
	height: 184rpx;
	background: #ffffff;
	box-shadow: -8rpx 0rpx 8rpx 0rpx rgba(236, 225, 214, 0.34);
}
.btn_class {
	font-weight: 800;
	font-size: 28rpx;
	color: #22150b;
	line-height: 33rpx;
	text-align: left;
	font-style: normal;
	text-transform: none;
	margin-top: 20rpx;
	width: 686rpx;
	height: 88rpx;
	background: #fdd637;
	border-radius: 100rpx 100rpx 100rpx 100rpx;
}
</style>
